<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class Person {
            constructor(name, age) {
                this.name = name;
                this.age = age;
                this.jump = function () {
                    console.log('test Person');

                }
            }
            static hobby = '性别男爱好女';
            static guess() {
                console.log('person上的静态方法');

            }
            hope() {
                console.log('person 的  prototype上的方法');

            }
        }

        // 子类 extends super
        class Son extends Person {
            constructor(name, age) {
                super(name, age);

            }
            static hobby_son() {
                console.log('测试hobby_son');
                super.guess();
                console.log(super.hobby);


            }
            hope_son() {
                console.log('测试hope_son');
                super.hope();

            }
        }

        let tom_son = new Son('tom', 10); 
        Son.hobby_son();
        tom_son.hope_son()
    </script>
</body>

</html>